﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 设计模式.组合实体模式
{
    class Client
    {
        private CompositeEntity compositeEntity = new();
        public void PrintData()
        {
            foreach(string s in compositeEntity.GetData())
            {
                Console.WriteLine("Data: " + s);
            }
        }

        public void SetData(string data1,string data2)
        {
            compositeEntity.SetData(data1, data2);
        }
    }
}
